//
//  HttpUserParser.m
//  Cat
//
//  Created by lushitong on 2018/12/3.
//  Copyright © 2018年 lushitong. All rights reserved.
//

#import "HttpUserParser.h"
#import "FMDBUser.h"
#import "MemberModel.h"

@implementation HttpUserParser

+ (FMDBUser *)parseUserData:(NSDictionary *)dic {
	if (!dic) {return nil;}
	FMDBUser *user = [[FMDBUser alloc] init];
	user.avator = dic[@"avatar"];
	user.nickName = dic[@"nickName"];
	user.rank = dic[@"rank"];
	user.inviteCode = dic[@"inviteCode"];
	user.balance = dic[@"balance"];
	user.expectAmount = dic[@"expectAmount"];
	user.lastAmount = dic[@"lastAmount"];
	user.fansNum = dic[@"fansNum"];
	user.groupAmount = dic[@"groupAmount"];
	user.phone = UDPhone;
	return user;
}

+ (MemberModel *)parseMemberData:(NSDictionary *)dic {
	if (!dic) {return nil;}
	MemberModel *model = [MemberModel yy_modelWithDictionary:dic];
	return model;
}
@end
